﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using HotelManagement._04.OBJECT;
using HotelManagement._03.DAO;

namespace HotelManagement._02.BUS
{
    class CheckInInfoBUS
    {
        CheckInInfoDAO m_CheckInDAO = new CheckInInfoDAO();

        public DataTable ViewCheckIn()
        {
            return m_CheckInDAO.ViewCheckIn("pr_tblCheckIn_View");
        }
        public DataTable ViewRoomIsCanceled()
        {
            return m_CheckInDAO.ViewCheckIn("pr_tblCheckIn_SelectRoomIsCanceled");
        }
        public DataTable ViewInfoRoom(string ip_RoomID)
        { 
            return m_CheckInDAO.ViewInfoRoom(ip_RoomID,"pr_tblCheckIn_SelectCustomer");
        }
        public DataTable ViewInfoCustomer(int ip_CustomerID)
        {
            return m_CheckInDAO.ViewInfoCustomer(ip_CustomerID, "pr_tblCustomer_SelectRow_ByCheckInID");
        }

        public DataTable SelectRoomID()
        {
            return m_CheckInDAO.ViewCheckIn("pr_tblRoom_SelectRoomID");
        }

        public bool UpdateCheckIn(CheckInInfo ip_CheckIn)
        {
            return m_CheckInDAO.UpdateCheckIn(ip_CheckIn, "pr_tblCheckIn_Update");
        }

        public bool DeleteCheckIn(CheckInInfo ip_CheckIn)
        {
            return m_CheckInDAO.DeleteCheckIn(ip_CheckIn, "pr_tblCheckIn_DeleteRow");
        }
    }
}
